#coding=utf-8

class NoWebPageError(Exception):
    def __init__(self, url):
        self.url = url
    def __str__(self):
        return "Cannot get the web page from %s."%self.url
        
class NoFileError(Exception):
    def __init__(self, url):
        self.url = url
    def __str__(self):
        return "Cannot get the file from %s."%self.url
        
class NoIpoError(Exception):
    def __init__(self, code, site):
        self.code = code
        self.site = site
    def __str__(self):
        return "%s:sorry, Can not find ipo date from %s"%(self.code, self.site)

class NoIssuePriceError(Exception):
    def __init__(self, code, site):
        self.code = code
        self.site = site
    def __str__(self):
        return "%s:sorry, Can not find issue price from %s"%(self.code, self.site)
        
class NoPriceError(Exception):
    def __init__(self, code, ttime):
        self.code = code
        self.time = ttime
        
    def __str__(self):
        return "%s: no Price Data on %s"%(self.code, self.time)

class NoDealError(Exception):
    def __init__(self, code, exdate='0000-00-00'):
        self.code = code
        self.exdate = exdate
    def __str__(self):
        return "%s:no deal data from sina on %s"%(self.code, self.exdate)
